package com.bingyuan.aipassproject.view.adapter

import com.bingyuan.aipassproject.R
import com.bingyuan.aipassproject.entity.RobRecordResponse
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class RobRecordAdapter : BaseQuickAdapter<RobRecordResponse.ListBean.DataBean, BaseViewHolder>(R.layout.item_send_record){
    override fun convert(holder: BaseViewHolder, item: RobRecordResponse.ListBean.DataBean) {
        holder.setText(R.id.tvTitle,item.room.title)
        holder.setText(R.id.tvUserName,item.room.title)
        holder.setText(R.id.tvDate,item.rob_time)

        when(item.status){
            "finish"->{
                holder.setText(R.id.tvStatus,"已结束")
                holder.setText(R.id.tvHaveCoin,"订单完成")
            }
            "wait"->{
                holder.setText(R.id.tvStatus,"进行中")
                holder.setText(R.id.tvHaveCoin,"等待结算")
            }
        }
        holder.setText(R.id.tvSelectNums,"雷号"+item.order.select_num)
    }
}